{% include "header.html" %}

<!-- start page -->
<div id="page">
  <!-- start content -->

  <div id="content">
  {% for post in latest_posts %}
    <div class="post">
      <h2 class="title"><a href="#">{{ post.title }}</a></h2>
      <div class="entry">
        <p>{{ post.content }}</p>
      </div>
      <p class="meta">Posted on {{ post.modified }} by {{ post.user }}</a> &nbsp;|&nbsp; <a href="#">0 comments</a></p>
    </div>
  {% endfor %}
  </div>
  <!-- end content -->
  <!-- start sidebar -->
  <div id="sidebar">
    <ul>
      <li>
        <h2>Control Panel</h2>
        {% if not user %}
        <ul><a href="{{login_url}}">Login</a></ul>
        {% else %}
        <ul><a href="/post/new.html">New Post</a></ul>
        <ul>Update Profile</ul>
        <ul>Upload Picture</ul>
        <ul>Upload Music</ul>
        <ul><a herf="#">Logout</a></ul>
        {% endif %}
      </li>
      <li>
        <h2>Latest updates</h2>
        <ul>
          {% for update in latest_updates %}
          <li><a href="{{update.view_url}}">{{ update.title }}</a></li>
          {% endfor %}
        </ul>
      </li>
    </ul>
  </div>
  <!-- end sidebar -->
  <div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->

{% include "footer.html" %}
